package com.example.service.impl;

import com.example.annotations.Service;
import com.example.service.CacheService;
import com.example.utils.cacheutils.CacheUtils;

/**
 * @Classname CacheServiceImpl
 * @Description TODO
 * @Date 2022/7/28 22:27
 * @Created by XiongXiong
 * @Author: X.I.O
 */
@Service
public class CacheServiceImpl implements CacheService {

    @Override
    public Object getValue(String key) {
        return CacheUtils.get(key);
    }

    @Override
    public void setValue(String key, Object value) {
        CacheUtils.put(key,value,null);
    }

    @Override
    public void setValue(String key, Object value, Integer expireNum) {
        CacheUtils.put(key, value, expireNum);
    }
}
